import moment from 'moment'
// 客户薪资
export const salaryThead = [
  {
    type: 'selection',
    minWidth: 60,
    align: 'center',
    fixed: 'left',
  },
  {
    title: '算税方式',
    minWidth: 150,
    key: 'taxTypeName',
    fixed: 'left',
  },
  {
    title: '客户名称',
    minWidth: 150,
    key: 'customerName',
    fixed: 'left',
  },
  {
    title: '工资月份',
    minWidth: 150,
    key: 'salaryMonth',
    render: (h, params) => {
      const text = params.row.salaryMonth ? params.row.salaryMonth.slice(0, 7) : ''
      return h('span', text)
    }
  },
  {
    title: '税款所属月份',
    minWidth: 120,
    key: 'taxMonth',
    render: (h, params) => {
      const text = params.row.taxMonth ? moment(params.row.taxMonth).format('YYYY-MM') : ''
      return h('span', text)
    }
  },
  {
    title: '计薪起止时间',
    minWidth: 240,
    // key: 'salaryMonth',
    render: (h, params) => {
      // const startTime = (new Date(+new Date(params.row.salaryStartTime) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')).substring(0, 10)
      // const endTime = (new Date(+new Date(params.row.salaryEndTime) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')).substring(0, 10)
      const startTime = params.row.salaryStartTime ? params.row.salaryStartTime.slice(0, 10) : ''
      const endTime = params.row.salaryEndTime ? params.row.salaryEndTime.slice(0, 10) : ''
      const text = startTime + ' 至 ' + endTime
      return h('span', text)
    }
  },
  {
    title: '社保公积金扣除月份',
    minWidth: 240,
    key: 'deductionTypeName'
  },
  {
    title: '工资发放日期',
    minWidth: 150,
    key: 'payDate',
    render: (h, params) => {
      const text = params.row.payDate ? params.row.payDate.slice(0, 10) : ''
      return h('span', text)
    }
  },
  {
    title: '收入类型',
    minWidth: 280,
    key: 'incomeTypeName'
  },
  {
    title: '状态',
    minWidth: 160,
    key: 'statusName'
  },
  {
    title: '应发工资总额合计',
    minWidth: 150,
    key: 'shouldSalaryTotal'
  },
  {
    title: '社保扣除合计',
    minWidth: 150,
    tooltip: true,
    key: 'socialSecurityDeduct'
  },
  {
    title: '公积金扣除合计',
    minWidth: 150,
    key: 'providentFundDeduct'
  },
  {
    title: '专项附加扣除合计',
    minWidth: 150,
    key: 'specialDeduct'
  },
  {
    title: '其他扣除合计',
    minWidth: 150,
    key: 'otherDeduct'
  },
  {
    title: '个税扣除合计',
    minWidth: 150,
    key: 'incomeDeduct'
  },
  {
    title: '手续费合计',
    minWidth: 150,
    key: 'serviceCharge'
  },
  {
    title: '税后扣除',
    minWidth: 150,
    key: 'afterTaxDeduct'
  },
  {
    title: '实发工资总额合计',
    minWidth: 150,
    key: 'realSalaryTotal'
  },
  {
    title: '退回原因',
    minWidth: 150,
    key: 'backReason'
  },
  {
    title: '创建时间',
    minWidth: 180,
    key: 'createdOn',
    render: (h, params) => {
      const text = params.row.createdOn ? moment(params.row.createdOn).format('YYYY-MM-DD HH:mm') : ''
      return h('span', text)
    }
  },
  {
    title: '操作',
    minWidth: 200,
    align: 'center',
    key: 'action',
    slot: 'action',
    fixed: 'right'
  }
]

export const salaryTheadObj = {
  selection: {
    type: 'selection',
    minWidth: 60,
    align: 'center',
    fixed: 'left',
  },
  taxTypeName: {
    title: '算税方式',
    minWidth: 150,
    key: 'taxTypeName',
    fixed: 'left',
  },
  customerName: {
    title: '客户名称',
    minWidth: 150,
    key: 'customerName',
    fixed: 'left',
  },
  declareUnitName: {
    title: '申报单位',
    minWidth: 150,
    key: 'declareUnitName',
    tooltip: true,
  },
  salaryMonth: {
    title: '工资月份',
    minWidth: 150,
    key: 'salaryMonth',
    render: (h, params) => {
      const text = params.row.salaryMonth ? params.row.salaryMonth.slice(0, 7) : ''
      return h('span', text)
    }
  },
  taxMonth: {
    title: '税款所属月份',
    minWidth: 120,
    key: 'taxMonth',
    render: (h, params) => {
      const text = params.row.taxMonth ? moment(params.row.taxMonth).format('YYYY-MM') : ''
      return h('span', text)
    }
  },
  startEnd: {
    title: '计薪起止时间',
    minWidth: 240,
    // key: 'startEnd',
    render: (h, params) => {
      // const startTime = (new Date(+new Date(params.row.salaryStartTime) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')).substring(0, 10)
      // const endTime = (new Date(+new Date(params.row.salaryEndTime) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')).substring(0, 10)
      const startTime = params.row.salaryStartTime ? params.row.salaryStartTime.slice(0, 10) : ''
      const endTime = params.row.salaryEndTime ? params.row.salaryEndTime.slice(0, 10) : ''
      const text = startTime + ' 至 ' + endTime
      return h('span', text)
    }
  },
  deductionTypeName : {
    title: '社保公积金扣除月份',
    minWidth: 240,
    key: 'deductionTypeName'
  },
  payDate: {
    title: '工资发放日期',
    minWidth: 150,
    key: 'payDate',
    render: (h, params) => {
      const text = params.row.payDate ? params.row.payDate.slice(0, 10) : ''
      return h('span', text)
    }
  },
  incomeTypeName: {
    title: '收入类型',
    minWidth: 280,
    key: 'incomeTypeName'
  },
  statusName: {
    title: '状态',
    minWidth: 160,
    key: 'statusName'
  },
  shouldSalaryTotal: {
    title: '应发工资总额合计',
    minWidth: 150,
    key: 'shouldSalaryTotal'
  },
  socialSecurityDeduct: {
    title: '社保扣除合计',
    minWidth: 150,
    tooltip: true,
    key: 'socialSecurityDeduct'
  },
  providentFundDeduct: {
    title: '公积金扣除合计',
    minWidth: 150,
    key: 'providentFundDeduct'
  },
  specialDeduct: {
    title: '专项附加扣除合计',
    minWidth: 150,
    key: 'specialDeduct'
  },
  otherDeduct: {
    title: '其他扣除合计',
    minWidth: 150,
    key: 'otherDeduct'
  },
  incomeDeduct: {
    title: '个税扣除合计',
    minWidth: 150,
    key: 'incomeDeduct'
  },
  serviceCharge: {
    title: '手续费合计',
    minWidth: 150,
    key: 'serviceCharge'
  },
  afterTaxDeduct: {
    title: '税后扣除',
    minWidth: 150,
    key: 'afterTaxDeduct'
  },
  realSalaryTotal: {
    title: '实发工资总额合计',
    minWidth: 150,
    key: 'realSalaryTotal'
  },
  backReason: {
    title: '退回原因',
    minWidth: 150,
    key: 'backReason'
  },
  createdOn: {
    title: '创建时间',
    minWidth: 180,
    key: 'createdOn',
    render: (h, params) => {
      const text = params.row.createdOn ? moment(params.row.createdOn).format('YYYY-MM-DD HH:mm') : ''
      return h('span', text)
    }
  },
  action: {
    title: '操作',
    minWidth: 200,
    align: 'center',
    key: 'action',
    slot: 'action',
    fixed: 'right'
  }
}

// 薪资详情
export const salaryDetailThead = [
  {
    type: 'selection',
    minWidth: 60,
    align: 'center'
  },
  {
    title: '客户名称',
    minWidth: 150,
    key: 'customerName'
  },
  {
    title: '工资月份',
    minWidth: 150,
    key: 'salaryMonth',
    render: (h, params) => {
      const text = (params.row.salaryMonth).slice(0, 7)
      return h('span', text)
    }
  },
  {
    title: '计薪起止时间',
    minWidth: 240,
    // key: 'salaryMonth',
    render: (h, params) => {
      // const startTime = (new Date(+new Date(params.row.salaryStartTime) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')).substring(0, 10)
      // const endTime = (new Date(+new Date(params.row.salaryEndTime) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')).substring(0, 10)
      const startTime = params.row.salaryStartTime ? params.row.salaryStartTime.slice(0, 10) : ''
      const endTime = params.row.salaryEndTime ? params.row.salaryEndTime.slice(0, 10) : ''
      const text = startTime + ' 至 ' + endTime
      return h('span', text)
    }
  },
  {
    title: '社保公积金扣除月份',
    minWidth: 240,
    key: 'deductionTypeName'
  },
  {
    title: '工资发放日期',
    minWidth: 150,
    key: 'payDate',
    render: (h, params) => {
      const text = params.row.payDate ? params.row.payDate.slice(0, 10) : ''
      return h('span', text)
    }
  },
  {
    title: '收入类型',
    minWidth: 240,
    key: 'incomeTypeName'
    // className: 'color-error-column'
  },
  {
    title: '姓名',
    minWidth: 150,
    key: 'name'
  },
  {
    title: '身份证号码',
    minWidth: 200,
    tooltip: true,
    key: 'identityCardNO'
  },
  {
    title: '开户行',
    minWidth: 200,
    key: 'bankName'
    // className: 'bg-gray-column'
  },
  {
    title: '卡号',
    minWidth: 200,
    key: 'bankAccountNo'
    // className: 'bg-gray-column'
  },
  {
    title: '工资发放银行',
    minWidth: 150,
    key: 'salaryBank'
  },
  {
    title: '手机号码',
    minWidth: 150,
    key: 'phone'
  },
  {
    title: '应发工资总额',
    minWidth: 150,
    key: 'shouldSalaryTotal'
  },
  {
    title: '社保扣除',
    minWidth: 150,
    key: 'socialSecurityDeduct'
    // className: 'bg-gray-column'
  },
  {
    title: '公积金扣除',
    minWidth: 150,
    key: 'providentFundDeduct'
    // className: 'bg-gray-column'
  },
  {
    title: '专项附加扣除',
    minWidth: 150,
    key: 'specialDeduct'
  },
  {
    title: '其他扣除',
    minWidth: 150,
    key: 'otherDeduct'
    // className: 'bg-gray-column'
  },
  {
    title: '个税扣除',
    minWidth: 150,
    key: 'incomeDeduct'
  },
  {
    title: '手续费',
    minWidth: 150,
    key: 'serviceCharge'
  },
  {
    title: '税后扣除',
    minWidth: 150,
    key: 'afterTaxDeduct'
  },
  {
    title: '累计抵扣',
    minWidth: 150,
    key: 'historyDeduct'
  },
  {
    title: '备注',
    minWidth: 150,
    key: 'description'
  },
  {
    title: '实发工资总额',
    minWidth: 150,
    key: 'realSalaryTotal',
    slot: 'action',
    fixed: 'right'
  }
]

export const salaryDetailTheadObj = {
  selection: {
    type: 'selection',
    minWidth: 60,
    align: 'center'
  },
  customerName: {
    title: '客户名称',
    minWidth: 150,
    key: 'customerName'
  },
  declareUnitName: {
    title: '申报单位',
    minWidth: 150,
    key: 'declareUnitName',
    tooltip: true,
  },
  salaryMonth: {
    title: '工资月份',
    minWidth: 150,
    key: 'salaryMonth',
    render: (h, params) => {
      const text = (params.row.salaryMonth).slice(0, 7)
      return h('span', text)
    }
  },
  satrtEnd: {
    title: '计薪起止时间',
    minWidth: 240,
    // key: 'satrtEnd',
    render: (h, params) => {
      // const startTime = (new Date(+new Date(params.row.salaryStartTime) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')).substring(0, 10)
      // const endTime = (new Date(+new Date(params.row.salaryEndTime) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')).substring(0, 10)
      const startTime = params.row.salaryStartTime ? params.row.salaryStartTime.slice(0, 10) : ''
      const endTime = params.row.salaryEndTime ? params.row.salaryEndTime.slice(0, 10) : ''
      const text = startTime + ' 至 ' + endTime
      return h('span', text)
    }
  },
  deductionTypeName: {
    title: '社保公积金扣除月份',
    minWidth: 240,
    key: 'deductionTypeName'
  },
  payDate: {
    title: '工资发放日期',
    minWidth: 150,
    key: 'payDate',
    render: (h, params) => {
      const text = params.row.payDate ? params.row.payDate.slice(0, 10) : ''
      return h('span', text)
    }
  },
  incomeTypeName: {
    title: '收入类型',
    minWidth: 240,
    key: 'incomeTypeName'
    // className: 'color-error-column'
  },
  name: {
    title: '姓名',
    minWidth: 150,
    key: 'name'
  },
  identityCardNO: {
    title: '身份证号码',
    minWidth: 200,
    tooltip: true,
    key: 'identityCardNO'
  },
  bankName: {
    title: '开户行',
    minWidth: 200,
    key: 'bankName'
    // className: 'bg-gray-column'
  },
  bankAccountNo: {
    title: '卡号',
    minWidth: 200,
    key: 'bankAccountNo'
    // className: 'bg-gray-column'
  },
  salaryBank: {
    title: '工资发放银行',
    minWidth: 150,
    key: 'salaryBank'
  },
  phone: {
    title: '手机号码',
    minWidth: 150,
    key: 'phone'
  },
  shouldSalaryTotal: {
    title: '应发工资总额',
    minWidth: 150,
    key: 'shouldSalaryTotal'
  },
  socialSecurityDeduct: {
    title: '社保扣除',
    minWidth: 150,
    key: 'socialSecurityDeduct'
    // className: 'bg-gray-column'
  },
  providentFundDeduct: {
    title: '公积金扣除',
    minWidth: 150,
    key: 'providentFundDeduct'
    // className: 'bg-gray-column'
  },
  specialDeduct: {
    title: '专项附加扣除',
    minWidth: 150,
    key: 'specialDeduct'
  },
  otherDeduct: {
    title: '其他扣除',
    minWidth: 150,
    key: 'otherDeduct'
    // className: 'bg-gray-column'
  },
  incomeTax: {
    title: '个税扣除',
    minWidth: 150,
    key: 'incomeTax'
  },
  incomeTaxDiff: {
    title: '个税差额',
    minWidth: 150,
    key: 'incomeTaxDiff'
  },
  serviceCharge: {
    title: '手续费',
    minWidth: 150,
    key: 'serviceCharge'
  },
  afterTaxDeduct: {
    title: '税后扣除',
    minWidth: 150,
    key: 'afterTaxDeduct'
  },
  historyDeduct: {
    title: '累计抵扣',
    minWidth: 150,
    key: 'historyDeduct'
  },
  description: {
    title: '备注',
    minWidth: 150,
    key: 'description'
  },
  realSalaryTotal: {
    title: '实发工资总额',
    minWidth: 150,
    key: 'realSalaryTotal',
    slot: 'action',
    fixed: 'right'
  },
  totalShouldSalaryTotal: {
    title: '累计应发工资总额',
    minWidth: 150,
    key: 'totalShouldSalaryTotal'
  },
  totalSocialSecurityDeduct: {
    title: '累计社保扣除',
    minWidth: 150,
    key: 'totalSocialSecurityDeduct'
  },
  totalProvidentFundDeduct: {
    title: '累计公积金扣除',
    minWidth: 150,
    key: 'totalProvidentFundDeduct'
  },
  totalSpecialDeduct: {
    title: '累计专项附加扣除',
    minWidth: 150,
    key: 'totalSpecialDeduct'
  },
  totalReductionFee: {
    title: '累计减除费用',
    minWidth: 150,
    key: 'totalReductionFee'
  },
  totalOtherDeduct: {
    title: '累计其他扣除',
    minWidth: 150,
    key: 'totalOtherDeduct'
  },
  taxableIncome: {
    title: '累计应纳税所得额',
    minWidth: 150,
    key: 'taxableIncome'
  },
  totalIncomeDeduct: {
    title: '累计应缴个税',
    minWidth: 150,
    key: 'totalIncomeDeduct'
  },
  prePayIncomeDeduct: {
    title: '已预缴个税',
    minWidth: 150,
    key: 'prePayIncomeDeduct'
  },
}

// 员工认证状态
export const empStatusThead = [
  {
    type: 'selection',
    minWidth: 60,
    align: 'center',
    fixed: 'left',
  },
  {
    title: '姓名',
    minWidth: 150,
    key: 'name',
  },
  {
    title: '身份证号码',
    minWidth: 200,
    key: 'idCardNo',
  },
  {
    title: '手机号码',
    minWidth: 150,
    key: 'phone'
  },
  {
    title: '入职时间',
    minWidth: 150,
    key: 'onBoardingDate',
    render: (h, params) => {
      const text = params.row.onBoardingDate ? params.row.onBoardingDate.slice(0, 10) : ''
      return h('span', text)
    }
  },
  {
    title: '在职状态',
    minWidth: 150,
    key: 'beHiringName'
  },
  {
    title: '公司名称',
    minWidth: 150,
    key: 'customerName'
  },
  {
    title: '合作类型',
    minWidth: 150,
    key: 'typeName'
  },
  {
    title: '所属客服',
    minWidth: 150,
    key: 'serverName'
  },
  {
    title: '金三认证状态',
    minWidth: 150,
    key: 'authStatusName'
  },
  {
    title: '错误原因',
    minWidth: 150,
    key: 'remarks'
  },
  {
    title: '操作',
    minWidth: 200,
    align: 'center',
    key: 'action',
    slot: 'action',
    fixed: 'right'
  }
]

export const empStatusTheadObj = {
  selection: {
    type: 'selection',
    minWidth: 60,
    align: 'center',
    fixed: 'left',
  },
  name: {
    title: '姓名',
    minWidth: 150,
    key: 'name',
  },
  idCardNo: {
    title: '身份证号码',
    minWidth: 200,
    key: 'idCardNo',
  },
  phone: {
    title: '手机号码',
    minWidth: 150,
    key: 'phone'
  },
  onBoardingDate: {
    title: '入职时间',
    minWidth: 150,
    key: 'onBoardingDate',
    render: (h, params) => {
      const text = params.row.onBoardingDate ? moment(params.row.onBoardingDate).format('YYYY-MM-DD') : ''
      return h('span', text)
    }
  },
  beHiringName: {
    title: '在职状态',
    minWidth: 150,
    key: 'beHiringName'
  },
  customerName: {
    title: '公司名称',
    minWidth: 150,
    key: 'customerName'
  },
  declareUnitName: {
    title: '申报单位',
    minWidth: 150,
    key: 'declareUnitName',
    tooltip: true,
  },
  typeName: {
    title: '合作类型',
    minWidth: 150,
    key: 'typeName'
  },
  serverName: {
    title: '所属客服',
    minWidth: 150,
    key: 'serverName'
  },
  authStatusName: {
    title: '金三认证状态',
    minWidth: 150,
    key: 'authStatusName'
  },
  remarks: {
    title: '错误原因',
    minWidth: 150,
    key: 'remarks'
  },
  leaveDate: {
    title: '离职时间',
    minWidth: 150,
    key: 'leaveDate',
    render: (h, params) => {
      const text = params.row.leaveDate ? moment(params.row.leaveDate).format('YYYY-MM-DD') : ''
      return h('span', text)
    }
  },
  action: {
    title: '操作',
    minWidth: 280,
    align: 'center',
    key: 'action',
    slot: 'action',
    fixed: 'right'
  }
}

// 员工认证状态
export const specialThead = [
  {
    type: 'selection',
    minWidth: 60,
    align: 'center',
    fixed: 'left',
  },
  {
    title: '所属月份',
    minWidth: 150,
    key: 'salaryMonth',
    render: (h, params) => {
      const text = params.row.month ? params.row.month.slice(0, 7) : ''
      return h('span', text)
    }
  },
  {
    title: '姓名',
    minWidth: 150,
    key: 'name'
  },
  {
    title: '身份证号码',
    minWidth: 190,
    key: 'idCardNo'
  },
  {
    title: '手机号码',
    minWidth: 190,
    key: 'phone'
  },
  {
    title: '公司名称',
    minWidth: 150,
    key: 'customerName'
  },
  {
    title: '申报单位',
    minWidth: 150,
    key: 'declareUnitName',
    tooltip: true,
  },
  {
    title: '合作类型',
    minWidth: 150,
    key: 'typeName'
  },
  {
    title: '所属客服',
    minWidth: 150,
    key: 'serverName'
  },
  {
    title: '累计专项附加扣除',
    minWidth: 150,
    key: 'specialDeduct'
  },
  {
    title: '创建人',
    minWidth: 150,
    key: 'createdName'
  },
  {
    title: '创建时间',
    minWidth: 160,
    key: 'createdOn',
    render: (h, params) => {
      const text = params.row.createdOn ? moment(params.row.createdOn).format('YYYY-MM-DD HH:mm') : ''
      return h('span', text)
    }
  }
]

export const specialTheadObj = {
  selection: {
    type: 'selection',
    minWidth: 60,
    align: 'center',
    fixed: 'left',
  },
  salaryMonth: {
    title: '所属月份',
    minWidth: 150,
    key: 'salaryMonth',
    render: (h, params) => {
      const text = params.row.month ? params.row.month.slice(0, 7) : ''
      return h('span', text)
    }
  },
  name: {
    title: '姓名',
    minWidth: 150,
    key: 'name'
  },
  idCardNo: {
    title: '身份证号码',
    minWidth: 190,
    key: 'idCardNo'
  },
  phone: {
    title: '手机号码',
    minWidth: 190,
    key: 'phone'
  },
  customerName: {
    title: '公司名称',
    minWidth: 150,
    key: 'customerName'
  },
  declareUnitName: {
    title: '申报单位',
    minWidth: 150,
    key: 'declareUnitName',
    tooltip: true,
  },
  typeName: {
    title: '合作类型',
    minWidth: 150,
    key: 'typeName'
  },
  serverName: {
    title: '所属客服',
    minWidth: 150,
    key: 'serverName'
  },
  childrensEducation: {
    title: '累计子女教育',
    minWidth: 150,
    key: 'childrensEducation'
  },
  housingLoanInterest: {
    title: '累计住房贷款利息',
    minWidth: 150,
    key: 'housingLoanInterest'
  },
  housingRent: {
    title: '累计住房租金',
    minWidth: 150,
    key: 'housingRent'
  },
  caringOldPeople: {
    title: '累计赡养老人',
    minWidth: 150,
    key: 'caringOldPeople'
  },
  continuingEducation: {
    title: '累计继续教育',
    minWidth: 150,
    key: 'continuingEducation'
  },
  seriousIllnessMedical: {
    title: '累计大病医疗',
    minWidth: 150,
    key: 'seriousIllnessMedical'
  },
  specialDeduct: {
    title: '累计专项附加扣除',
    minWidth: 150,
    key: 'specialDeduct'
  },
  createdName: {
    title: '创建人',
    minWidth: 150,
    key: 'createdName'
  },
  createdOn: {
    title: '创建时间',
    minWidth: 160,
    key: 'createdOn',
    render: (h, params) => {
      const text = params.row.createdOn ? moment(params.row.createdOn).format('YYYY-MM-DD HH:mm') : ''
      return h('span', text)
    }
  }
}

export const taxResultTheadObj = {
  selection: {
    type: 'selection',
    minWidth: 60,
    align: 'center',
    fixed: 'left',
  },
  month: {
    title: '税款所属月份',
    minWidth: 150,
    key: 'month',
    render: (h, params) => {
      const text = params.row.month ? moment(params.row.month).format('YYYY-MM') : ''
      return h('span', text)
    }
  },
  incomeTypeName: {
    title: '收入类型',
    minWidth: 150,
    key: 'incomeTypeName',
    tooltip: true,
  },
  name: {
    title: '姓名',
    minWidth: 150,
    key: 'name'
  },
  idCardNo: {
    title: '身份证号码',
    minWidth: 200,
    key: 'idCardNo'
  },
  customerName: {
    title: '公司名称',
    minWidth: 240,
    key: 'customerName',
    tooltip: true,
  },
  declareUnitName: {
    title: '申报单位',
    minWidth: 150,
    key: 'declareUnitName',
    tooltip: true,
  },
  serverName: {
    title: '所属客服',
    minWidth: 150,
    key: 'serverName'
  },
  declareIncomeDeduct: {
    title: '申报个税',
    minWidth: 150,
    key: 'declareIncomeDeduct'
  },
  incomeDeduct: {
    title: '系统个税',
    minWidth: 150,
    key: 'incomeDeduct'
  },
  incomeDeductDiff: {
    title: '个税差额',
    minWidth: 150,
    key: 'incomeDeductDiff'
  },
  createdName: {
    title: '创建人',
    minWidth: 150,
    key: 'createdName'
  },
  createdOn: {
    title: '创建时间',
    minWidth: 160,
    key: 'createdOn',
    render: (h, params) => {
      const text = params.row.createdOn ? moment(params.row.createdOn).format('YYYY-MM-DD HH:mm') : ''
      return h('span', text)
    }
  }
}

export const cumulativeSubtractTheadObj = {
  selection: {
    type: 'selection',
    minWidth: 60,
    align: 'center',
    fixed: 'left',
  },
  year: {
    title: '纳税年度',
    minWidth: 150,
    key: 'year'
  },
  name: {
    title: '姓名',
    minWidth: 150,
    key: 'name'
  },
  idCardNo: {
    title: '身份证号码',
    minWidth: 200,
    key: 'idCardNo'
  },
  customerName: {
    title: '公司名称',
    minWidth: 240,
    key: 'customerName'
  },
  declareUnitName: {
    title: '申报单位',
    minWidth: 240,
    key: 'declareUnitName',
    tooltip: true,
  },
  serverName: {
    title: '所属客服',
    minWidth: 150,
    key: 'serverName'
  },
  reductionFee: {
    title: '累计减除费用',
    minWidth: 150,
    key: 'reductionFee'
  },
  enabled: {
    title: '状态',
    minWidth: 150,
    key: 'enabled',
    render: (h, params) => {
      const text = params.row.enabled ? '启用' : '禁用'
      return h('span', text)
    }
  },
  createdName: {
    title: '创建人',
    minWidth: 150,
    key: 'createdName'
  },
  createdOn: {
    title: '创建时间',
    minWidth: 160,
    key: 'createdOn',
    render: (h, params) => {
      const text = params.row.createdOn ? moment(params.row.createdOn).format('YYYY-MM-DD HH:mm') : ''
      return h('span', text)
    }
  },
  action: {
    title: '操作',
    minWidth: 100,
    align: 'center',
    key: 'action',
    slot: 'action',
    fixed: 'right'
  }
}